1. Field of the Invention
The present invention relates to a method and an apparatus for controlling the flow rate of cells at one or plural physical ports in packet communications, in particular in asynchronous transfer mode (referred to as ATM, hereinafter) communication system.
2. Description of the Prior Art
In a packet communication system, in particular in an ATM communication system, communications are executed in transfer unit called "cell". In this case, shaping control for controlling cell flow rate is executed in order to suppress the fluctuations of the flow rate of communications. Here, the shaping control is one of usage parameter controls. In this control method, cell flow rate is always monitored at each virtual transmission port, and whenever the flow rate exceeds a predetermined value, the cell transmission is delayed for shaping so that the cell flow rate does not exceed the predetermined value.
A prior art shaping control method will be explained hereinbelow with reference to FIG. 9. In FIG. 9, there are a plurality of virtual ports 231 to 232, 233 to 234, . . . , 235 to 236 in correspondence to a plurality of physical ports 201, 202, . . . , 203, respectively. The virtual ports 231 to 232, 233 to 234, . . . , 235 to 236 communicate with the physical ports 201, 202, . . . , 203, respectively under control of a shaper 220 and a plurality of schedulers 211, 212, . . . , 213.
When a cell is inputted to a queue of a buffer provided for each of the virtual ports 231 to 232, the intervals at which the cells are transmitted to the shaper 220 are managed so as to be smoothed. In addition, the schedulers 211 to 213 each provided for each of the physical ports 201 to 203 schedule both the cell of the queue shaped by the shaper 220 and the cell of the queue not shaped by the shaper 220. In general, the scheduling is executed in such a way that the queue to be shaped has a priority.
Further, a single scheduler 241 is provided as a whole, to select one physical port which transmits the cell, for each cell period, from among all the physical ports 201 to 203. This is because the physical port which can transmit cell for each cell period is only one. When there exist a cell shaped by the shaper 220, the scheduler 241 schedules the cell transmission in such a way that the corresponding cell can be transmitted to the selected physical port.
The above-mentioned prior art shaper 220 smooths the cell transmission intervals in accordance with the following procedure: The shaper 220 monitors the time elapsed after the preceding cell is transmitted for each of the virtual ports 231 to 236. For instance, as shown in FIG. 10, when the preceding cell is transmitted at a time point t1, at a time point t2 at which the predetermined time T1 has elapsed for shaping after the time point t1, the present cell can be transmitted. Therefore, a time elapsed after this time point t2 is a transmission delay time T2.
Further, when the cell transmission from the physical ports 201 to 203 to the rear stage apparatus stagnates, as when the cell transmission exceeds a predetermined transfer flow rate at the physical ports 201 to 203, there exists such a case that the cell transmission is still kept restricted even after the predetermined time T1 has elapsed. In this case, the shaper 220 monitors the transmission delay time T2 at each of the virtual ports 231 to 236, and when the load at the physical port is reduced below an allowable limit, the cell transmission is executed again, beginning from the maximum delay virtual port at which the transmission delay time T2 is maximum.
In the above-mentioned prior art flow rate control method, however, there exist the following problems: Since the maximum delay virtual ports must be discriminated, it is necessary to monitor and further compare all the cell transmission delay times T2 for each of all the virtual ports 231 to 236. Therefore, when the number of the virtual ports increases, the comparison processing of the transmission delay times is complicated more and more.
In addition, the processing of comparing the transmission delay times T2 must be executed within one cell period, after the load data (indicative of whether the load exceeds an allowable limit or not) have been decided at all the physical ports 201 to 203. In other words, the processing of discriminating the maximum delay virtual port must be perfectly completed, after the preceding cell has been transmitted at the time point t1, but between a time point when all the load data at all the physical ports 201 to 203 have been decided and a time point when the present cell must be transmitted. In general, however, it takes a relatively long time to decide the load data at all the physical ports. Therefore, the time interval between when all the load data are decided and when the present cell is transmitted is relatively short, so that it has been difficult to complete the discrimination processing of the maximum delay virtual port.
Further, in the case where there exist no transmittable cells stored in queues in the virtual ports 231 to 236 communicating with a physical port, there exists such a case that queues storing transmittable cells develop concentratively in a time shorter than a single cell period. Further, there exists such the case where the delay virtual ports develop concentratively within the same cell period at a plurality of the physical ports. In these cases, it is substantially impossible to discriminate the virtual port through which the cell is to be transmitted within a short time.
To overcome these problems, in the prior art flow rate control method, a plurality of buffer stages are provided at the front stage of the physical ports, to delay the timing at which the cell is transmitted to such an extent as to correspond to the number of the buffer stages. In this method, it is possible to obtain a time interval margin from when the load data are decided at all the physical ports to when the virtual port used to transmit the cell is discriminated. In this method, however, since the buffers are provided at the front stage of the physical ports, the cell transmission time itself is delayed, with the result that there exists a problem in that the throughput is lowered.
Further, in the case when a plurality of the physical ports are used and further demuitiplex communications are executed, the shaping must be executed at a plurality of physical ports, so that it is necessary to discriminate the maximum delay virtual port from among all the virtual ports. In this case, however, in the case where there exist a plurality of physical ports, the load data exist for each physical port and in addition the load data vary with the lapse of time. In the shaping at the physical ports, it is necessary to delay the transmission of the cell to the physical port having a large load and to transmit the cell to the physical port having no load. Therefore, it is necessary to select the maximum delay virtual port from among the virtual ports communicating with the physical port having no load. In this case, however, since the sequence of the queues at the virtual ports is not decided until the load data are decided, it is impossible to previously discriminate the maximum delay virtual port.